package com.ambulance.project.niosocket;

import java.io.IOException;

/***
 *  @description
 *  @author zhao
 *  @date: 2020/5/21
 *  @version: v1.0
 */
public class DoListen {
    public static void main(String[] args) throws IOException {
        System.out.println(System.getProperty("file.encoding"));
        final NoBlockingClient noBlockingClient = new NoBlockingClient();
        Thread thread = new Thread() {
            public void run() {
                try {
                    noBlockingClient.receFromUser();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

            ;
        };

        thread.start();
        noBlockingClient.talk();
    }
}
